package com.zyh.domain;

import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName student
 */
@Data
public class Student implements Serializable {
    /**
     * id
     */
    private Integer id;

    /**
     * 学生学号
     */
    private Integer stuNumber;

    /**
     * 学生姓名
     */
    private String stuName;

    /**
     * 专业id
     */
    private Integer stuMajorId;

    /**
     * 班级id
     */
    private Integer stuClassId;

    /**
     * 性别(0为女,1为男)
     */
    private Integer sex;

    /**
     * 入学时间
     */
    private LocalDateTime createTime;

    /**
     * 退学时间
     */
    private LocalDateTime destroyTime;

    /**
     * 密码
     */
    private String password;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Student other = (Student) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStuNumber() == null ? other.getStuNumber() == null : this.getStuNumber().equals(other.getStuNumber()))
            && (this.getStuName() == null ? other.getStuName() == null : this.getStuName().equals(other.getStuName()))
            && (this.getStuMajorId() == null ? other.getStuMajorId() == null : this.getStuMajorId().equals(other.getStuMajorId()))
            && (this.getStuClassId() == null ? other.getStuClassId() == null : this.getStuClassId().equals(other.getStuClassId()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getDestroyTime() == null ? other.getDestroyTime() == null : this.getDestroyTime().equals(other.getDestroyTime()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStuNumber() == null) ? 0 : getStuNumber().hashCode());
        result = prime * result + ((getStuName() == null) ? 0 : getStuName().hashCode());
        result = prime * result + ((getStuMajorId() == null) ? 0 : getStuMajorId().hashCode());
        result = prime * result + ((getStuClassId() == null) ? 0 : getStuClassId().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getDestroyTime() == null) ? 0 : getDestroyTime().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", stuNumber=").append(stuNumber);
        sb.append(", stuName=").append(stuName);
        sb.append(", stuMajorId=").append(stuMajorId);
        sb.append(", stuClassId=").append(stuClassId);
        sb.append(", sex=").append(sex);
        sb.append(", createTime=").append(createTime);
        sb.append(", destroyTime=").append(destroyTime);
        sb.append(", password=").append(password);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}